// 统一请求路径前缀在libs/axios.js中修改
import {
  getRequest,
  postRequest,
  formRequest,
  putRequest,
  deleteRequest,
  uploadFileRequest
} from "@/libs/axios";

//车辆终端

export const getCarTerminalPageList = params => {
  return getRequest("/bss/device/list", params);
};

export const addCarTerminal = params => {
  return postRequest("/bss/device/save", params);
};

export const editCarTerminal = params => {
  return postRequest("/bss/device/update", params);
};

export const deleteCarTerminal = params => {
  return postRequest("/bss/device/delete", params);
};

//车辆

export const getCarPageList = params => {
  return getRequest("/bss/car/list", params);
};

export const addCar = params => {
  return postRequest("/bss/car/save", params);
};

export const editCar = params => {
  return postRequest("/bss/car/update", params);
};

export const deleteCar = params => {
  return postRequest("/bss/car/delete", params);
};

export const getOperatorSelect = params => {
  return postRequest("/bss/operator/combo", params);
};

export const getCompanySelect = params => {
  return postRequest("/bss/company/combo", params);
};

/**
 * 获取车辆终端类型
 * @returns {*}
 */
export const getDevType = params => {
  return getRequest("/bss/devType/combo", params);
};

//围栏

export const getFencePageList = params => {
  return getRequest("/bss/fence/list", params);
};

export const addFence = params => {
  return postRequest("/bss/fence/save", params);
};

export const editFence = params => {
  return postRequest("/bss/fence/update", params);
};

export const deleteFence = params => {
  return postRequest("/bss/fence/delete", params);
};

export const bindFence = params => {
  return postRequest("/bss/fence/bind", params);
};

export const getCarFencePageList = params => {
  return getRequest("/bss/carfence/list", params);
};
export const unbindFence = params => {
  return postRequest("/bss/fence/unbind", params);
};

//线路

export const getPolylinePageList = params => {
  return getRequest("/bss/polyline/list", params);
};

export const getFlexPointPageList = params => {
  return getRequest("/bss/flexpoint/list", params);
};
export const editFlexPoint = params => {
  return postRequest("/bss/flexpoint/update", params);
};

export const addPolyline = params => {
  return postRequest("/bss/polyline/save", params);
};

export const editPolyline = params => {
  return postRequest("/bss/polyline/update", params);
};

export const deletePolyline = params => {
  return postRequest("/bss/polyline/delete", params);
};

export const bindPolyline = params => {
  return postRequest("/bss/polyline/bind", params);
};

export const getCarPolylinePageList = params => {
  return getRequest("/bss/carpolyline/list", params);
};
export const unbindPolyline = params => {
  return postRequest("/bss/polyline/unbind", params);
};

//区域管理

export const getAreaPageList = params => {
  return getRequest("/bss/customarea/list", params);
};

export const addArea = params => {
  return postRequest("/bss/customarea/save", params);
};

export const editArea = params => {
  return postRequest("/bss/customarea/update", params);
};

export const deleteArea = params => {
  return postRequest("/bss/customarea/delete", params);
};

//customLine线路管理
export const getLinePageList = params => {
  return getRequest("/bss/customline/list", params);
};

export const getCustomFlexPointPageList = params => {
  return getRequest("/bss/customflexpoint/list", params);
};

export const addLine = params => {
  return postRequest("/bss/customline/save", params);
};

export const editLine = params => {
  return postRequest("/bss/customline/update", params);
};

export const deleteLine = params => {
  return postRequest("/bss/customline/delete", params);
};

/**
 * 获取自定久线路
 * @param params
 * @returns {*}
 */
export const getCustomLine = params => {
  return getRequest("/bss/customline/combo", params);
};

/**
 * 获取自定区域
 * @param params
 * @returns {*}
 */
export const getCustomArea = params => {
  return getRequest("/bss/customarea/combo", params);
};

/**
 * 获取设备警报列表
 * @param params
 */
export const getDevAlarmList = params => {
  return getRequest("/bss/devalarm/list", params);
};

/**
 * 添加设备警报规则
 * @param params
 * @returns {*}
 */
export const addDevAlarm = params => {
  return postRequest("/bss/devalarm/save", params);
};
/**
 * 编辑设备警报规则
 * @param params
 * @returns {*}
 */
export const editDevAlarm = params => {
  return postRequest("/bss/devalarm/update", params);
};
/**
 * 删除设备警报规则
 * @param params
 * @returns {*}
 */
export const deleteDevAlarm = params => {
  return postRequest("/bss/devalarm/delete", params);
};

/**
 * 获取设备报警类型列表
 * @param params
 * @returns {*}
 */
export const getDeviceAlarmTypeList = params => {
  return postRequest("/bss/devalarm/combo", params);
};

/**
 * 获取平台警报列表
 * @param params
 */
export const getPlatformAlarmList = params => {
  return getRequest("/bss/platformalarm/list", params);
};

/**
 * 添加平台警报规则
 * @param params
 * @returns {*}
 */
export const addPlatformAlarm = params => {
  return postRequest("/bss/platformalarm/save", params);
};
/**
 * 编辑平台警报规则
 * @param params
 * @returns {*}
 */
export const editPlatformAlarm = params => {
  return postRequest("/bss/platformalarm/update", params);
};
/**
 * 删除平台警报规则
 * @param params
 * @returns {*}
 */
export const deletePlatformAlarm = params => {
  return postRequest("/bss/platformalarm/delete", params);
};

/**
 * order
 * @param params
 */
export const getOrderPageList = params => {
  return getRequest("/bss/order/list", params);
};
//Vip

export const getVipPageList = params => {
  return getRequest("/bss/vip/list", params);
};

export const addVip = params => {
  return postRequest("/bss/vip/save", params);
};

export const editVip = params => {
  return postRequest("/bss/vip/update", params);
};

export const deleteVip = params => {
  return postRequest("/bss/vip/delete", params);
};
